﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace FacultyExample
{
    class Department
    {
        public string Name;
        public List<Group> groups = new List<Group>();

        public static int departmentCount = 100;

        public static Department GenerateRandomDepartment()
        {
            Department department = new Department();
            department.Name = "Department" + departmentCount++;
            for (int i = 0; i < 3; i++)
            {
                Group grp = Group.GenerateRandomGroup();
                department.groups.Add(grp);
            }
            return department;
        }

        public void PrintDepartmentToConsole()
        {
            Console.WriteLine("Department Name: {0}", Name);
            foreach (var group in groups)
            {
                group.PrintGroupToConsole();
                Console.WriteLine("----------------------");
            }
        }
    }
}
